package week_9;

import week_9.CityNetwork;

public class CityNetworkTest
{
    public static void main(String[] args) {
        CityNetwork net = new CityNetwork();
        net.addCity("陇南");
        net.addCity("天水");
        net.addCity("宝鸡");
        net.addCity("汉中");
        net.addCity("绵阳");

        net.addEdge(0,1,360);
        net.addEdge(0,2,200);
        net.addEdge(0,4,160);
        net.addEdge(2,3,90);
        net.addEdge(2,4,413);
        net.addEdge(3,4,378);
        net.addEdge(1,4,502);
        net.addEdge(1,3,298);


        System.out.println(net.toString());
        net.getShortestPath("陇南","汉中");
        net.getShortestWeightPath("陇南","汉中");
    }
}
